package pharao.client.views.game.landkarte.ort.status;

import pharao.client.views.events.GetModelDataEvent;
import pharao.client.views.game.landkarte.ort.status.events.ShowOrtStatusViewEvent;
import hmvc4gwt.client.event.IHmvcEvent;
import hmvc4gwt.framework.client.controller.GuiController;
import hmvc4gwt.framework.client.events.AddViewEvent;

public class OrtStatusController extends GuiController {

	protected void initImpl() {
		register(ShowOrtStatusViewEvent.class, this);
	}

	public void handleEventImpl(IHmvcEvent event) {
		if (event instanceof ShowOrtStatusViewEvent) {
			fireEventLocal(new GetModelDataEvent());
			fireEvent(new AddViewEvent(getView()), true, false, false);
		}
	}

	public Class getClassOfObject() {
		return OrtStatusController.class;
	}

}
